package cn.com.suhenry.controller;

import cn.com.suhenry.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;

@Controller
public class PathController {
    @GetMapping("/login.html")
    public String login(){
        return "login";
    }
    @GetMapping("/submit.html")
    public String submit(){
        return "submit";
    }
    @GetMapping("/order.html")
    public String order(HttpSession session){
        User user= (User) session.getAttribute("USER");
        session.removeAttribute("USER");
        session.setAttribute("USER",user);
        return "order";
    }
}
